package com.flyco.animation;

import android.view.View;
import android.view.animation.Interpolator;
import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.Animator.AnimatorListener;
import com.nineoldandroids.animation.AnimatorSet;
import com.nineoldandroids.view.ViewHelper;

public abstract class BaseAnimatorSet
{
  protected AnimatorSet animatorSet = new AnimatorSet();
  private long delay;
  protected long duration = 500L;
  private Interpolator interpolator;
  private AnimatorListener listener;

  public static void reset(View paramView)
  {
    ViewHelper.setAlpha(paramView, 1.0F);
    ViewHelper.setScaleX(paramView, 1.0F);
    ViewHelper.setScaleY(paramView, 1.0F);
    ViewHelper.setTranslationX(paramView, 0.0F);
    ViewHelper.setTranslationY(paramView, 0.0F);
    ViewHelper.setRotation(paramView, 0.0F);
    ViewHelper.setRotationY(paramView, 0.0F);
    ViewHelper.setRotationX(paramView, 0.0F);
  }

  public BaseAnimatorSet delay(long paramLong)
  {
    this.delay = paramLong;
    return this;
  }

  public BaseAnimatorSet duration(long paramLong)
  {
    this.duration = paramLong;
    return this;
  }

  public BaseAnimatorSet interpolator(Interpolator paramInterpolator)
  {
    this.interpolator = paramInterpolator;
    return this;
  }

  public BaseAnimatorSet listener(AnimatorListener paramAnimatorListener)
  {
    this.listener = paramAnimatorListener;
    return this;
  }

  public void playOn(View paramView)
  {
    start(paramView);
  }

  public abstract void setAnimation(View paramView);

  protected void start(View paramView)
  {
    reset(paramView);
    setAnimation(paramView);
    this.animatorSet.setDuration(this.duration);
    if (this.interpolator != null)
      this.animatorSet.setInterpolator(this.interpolator);
    if (this.delay > 0L)
      this.animatorSet.setStartDelay(this.delay);
    if (this.listener != null)
      this.animatorSet.addListener(new Animator.AnimatorListener()
      {
        public void onAnimationCancel(Animator paramAnonymousAnimator)
        {
          BaseAnimatorSet.this.listener.onAnimationCancel(paramAnonymousAnimator);
        }

        public void onAnimationEnd(Animator paramAnonymousAnimator)
        {
          BaseAnimatorSet.this.listener.onAnimationEnd(paramAnonymousAnimator);
        }

        public void onAnimationRepeat(Animator paramAnonymousAnimator)
        {
          BaseAnimatorSet.this.listener.onAnimationRepeat(paramAnonymousAnimator);
        }

        public void onAnimationStart(Animator paramAnonymousAnimator)
        {
          BaseAnimatorSet.this.listener.onAnimationStart(paramAnonymousAnimator);
        }
      });
    this.animatorSet.start();
  }

  public static abstract interface AnimatorListener
  {
    public abstract void onAnimationCancel(Animator paramAnimator);

    public abstract void onAnimationEnd(Animator paramAnimator);

    public abstract void onAnimationRepeat(Animator paramAnimator);

    public abstract void onAnimationStart(Animator paramAnimator);
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.flyco.animation.BaseAnimatorSet
 * JD-Core Version:    0.6.2
 */